<template>
  <div>
    <el-table :data="list" v-loading="listLoading" border style="width: 100%">
      <el-table-column prop="sign" width="5%" align="center">
        <template scope="scope">
          <el-checkbox :checked="!!scope.row.open === true" disabled></el-checkbox>
        </template>
      </el-table-column>
      <el-table-column prop="sign" label="模块名称" width="25%" align="center"></el-table-column>
      <el-table-column prop="name" label="使用名称" width="25%" align="center"></el-table-column>
      <el-table-column label="图标" width="25%" align="center">
        <template scope="scope">
          <v-circular-image v-if="scope.row.icon" :src="scope.row.icon" />
        </template>
      </el-table-column>
      </el-table-column>
      <el-table-column label="操作" width="20%" align="center">
        <template scope="scope">
          <el-button size="small" type="success" @click="setting(scope.row)">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  name: 'settingModuleChild',
  props: {
    id: {
      type: Number,
      default: 16
    }
  },
  data() {
    return {
      listLoading: false,
      list: []
    }
  },
  created() {
    this.getChildModule()
  },
  methods: {
    getChildModule() {
      this.listLoading = true
      this.$http.post('/api/system/column/list', {id: this.id}).then(respones => {
        this.listLoading = false
        if (respones.body.code === '00050') {
          this.list = respones.body.data
        } else {
          this.$message.error(respones.body.msg)
        }
      })
    }
  }
}
</script>
<style lang=''>
</style>
